<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>包装类型</title>
</head>
<body>
    <script>
        // 包装类型
        // const str = 'dingxiaodou'
        // console.log(str.length) // 11

        // 包装过程
        // substring()：截取字符串，返回一个新的字符串
       const str = new String('dingxiaodou')
       // str.substring()
       console.log(str.substring()) // dingxiaodou
       console.log(str) // String {'dingxiaodou'}
       
       str = null
       console.log(str)
    </script>
</body>
</html>